package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.nursing.domain.TableDataInfo;
import com.zzyl.nursing.domain.WechatData;
import com.zzyl.nursing.dto.NursingWechatPageQueryDTO;
import com.zzyl.nursing.service.INursingWechatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/member/orders/project")
public class NursingWechatController {
    @Autowired
    private INursingWechatService nursingWechatService;

    //分页查询护理项目列表
    @GetMapping("/page")
    public TableDataInfo page(NursingWechatPageQueryDTO nursingWechatPageQueryDTO) {
        return nursingWechatService.page(nursingWechatPageQueryDTO);
    }

    //根据编号查询护理项目信息
    @GetMapping("/{id}")
    public AjaxResult getById(@PathVariable Long id) {
      WechatData wechatData = nursingWechatService.getById(id);
        return AjaxResult.success(wechatData);
    }
}
